package com.teamwork.module03.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.teamwork.common.entity.module03.RtoR;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface RtoRMapper extends BaseMapper<RtoR> {
    @Delete("delete from tb_module03_r_to_r where comment_id = #{cid}")
    void deleteByCid(@Param("cid") Integer cid);

    @Insert("insert into tb_module03_r_to_r (replay_id_from,replay_id_to,comment_id,createtime) " +
            "values (#{re_from_id},#{o},#{commentid},#{nowtime})")
    void addOne(Long re_from_id, Object o, Integer commentid, String nowtime);
}
